<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>个人信息修改</title>
<script type="text/javascript" src="__PUBLIC__/js/jquery-1.6.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/easyvalidator/js/easy_validator.pack.js"></script>
<link href="__PUBLIC__/js/easyvalidator/css/validate.css" rel="stylesheet" type="text/css" />
<style type="text/css">
.label{color:#333;font-size:12px;width:60px;background: ;padding:7px 0 0 0; float:left;}
ul{ width:350px; list-style:none; margin-top:50px; height:600px;}
ul li{ margin-top:30px; height:20px; }
input{ float:left;}
ul span{ color:#963; font-size:12px; margin-left:10px;}
#submit_1{ margin-left:30px; cursor:pointer; cursor:hand;width:46px; text-align:center;height:43px; border:none; background:url(__PUBLIC__/images/submit000.png);}
</style>
<script type="text/javascript">
var isExtendsValidate = true;	//如果要试用扩展表单验证的话，该属性一定要申明
function extendsValidate(){	//函数名称，固定写法
	
	//密码匹配验证
	if( $('#newpass1').val() == $('#newpass2').val() ){	//匹配成功
		$('#newpass2').validate_callback(null,"sucess");	//此次是官方提供的，用来消除以前错误的提示
	}else{//匹配失败
		$('#newpass2').validate_callback("密码不匹配","failed");	//此处是官方提供的API，效果则是当匹配不成功，pwd2表单 显示红色标注，并且TIP显示为“密码不匹配”
		return false;
	}
}
$(function(){
	$("#submit_1").click(function(){
		$("#form_x").submit();						  
	});
})
/*
$(function(){
	$("#submit_1").click(function(){
		if($("#oldname").val()!=""){
			if($("#newname").val()==""){
				$("#newnamemsg").html("请填写新用户名");
				$("#newname").focus();
			}else{
				var reg = /^(\w){6,20}$/; 
				var str = $("#newname").val();
				if(reg.test(str)==false){
					$("#newnamemsg").html("只能由6-20位字母，数字，或者下划线组成!");
					$("#newname").focus();
				}else{
					$("#newnamemsg").html("正确");
				}
			}
		}else{
			$("#newname").attr("value","");
			$("#newnamemsg").html("");
		}
		if($("#oldpass").val()!=""){
			if($("#newpass1").val()==""){
				$("#newpass1msg").html("请填写新密码");
			}else{
				var reg = /^(\w){6,20}$/;
				var pas = $("#newpass1").val();
				if(reg.test(pas)==false){
					$("#newpass1msg").html("密码格式不匹配");
				}
			}
			if($("#newpass2").val()==""){
				$("#newpass2msg").html("请填写新密码");
			}
			if($("#newpass1").val()!="" && $("#newpass1").val()!=""){
				if($("#newpass1").val()!=$("#newpass2").val()){
					$("#newpass2msg").html("两次输入的密码不一致！");
					$("#newpass2").focus();
				}else{
					$("#newpass1msg").html("");
					$("#newpass2msg").html("正确");
				}
			}
		}else{
			$("#form_x").submit();
		}
		
	});
})*/
</script>
</head>

<body>
<center>
    <ul>
    <form action="__URL__/updateNP" method="post" id="form_x" name="form_x">
        <li><div class="label">原用户名：</div><input type="text" name="oldname" id="oldname" reg="^\w{0}$|^(\w){6,20}$" tip="6-20位字母，数字，下划线组成" /><span></span></li>
	  	<li><div class="label">新用户名：</div><input type="text" name="newname" id="newname" reg="^\w{0}$|^(\w){6,20}$" tip="6-20位字母，数字，下划线组成" /><span id="newnamemsg"></span></li>
        <li><div class="label">原 密 码：</div><input type="text" name="oldpass" id="oldpass" reg="^\w{0}$|^(\w){6,20}$" tip="6-20位字母，数字，下划线组成" /><span id="oldpassmsg"></span></li>
        <li><div class="label">新 密 码：</div><input type="text" name="newpass1" id="newpass1" reg="^\w{0}$|^(\w){6,20}$" tip="6-20位字母，数字，下划线组成" /><span id="newpass1msg"></span></li>
        <li><div class="label">重复密码：</div><input type="text" name="newpass2" id="newpass2" reg="^\w{0}$|^(\w){6,20}$" tip="6-20位字母，数字，下划线组成" /><span id="newpass2msg"></span></li>
        <li><div class="label"></div><input type="button" title="提交" id="submit_1" /></li>       
    </form>
    </ul>
</center>
</body>
</html>
